{% extends "base_admin.html"%}
{%load static%}

{% block css%}
<link rel="stylesheet" href="{%static '/css/car_change.css'%}">
<link rel="stylesheet" href="{%static '/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css'%}">
{% endblock %}
{% block content%}
<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">变更车辆信息</h3>
  </div>
  <div class="panel-body">
    <form class="form" action="" method="post" novalidate>
        {%csrf_token%}
            {% for field in form %}
                <div class="form-group">
                    {%if field.label == '部门' or field.label == '姓名' or field.label == '车牌号' or field.label == '电话号码' or field.label == '到期时间' or field.label == '人员类别'%}
                    <span style="color: red;">*</span>{{field.label}}
                    {%else%}
                    {{field.label}}
                    {%endif%}
                    {{field}}
                    <span style="color: red;">{{field.errors.0}}</span>
                </div>
            {% endfor%}
        <button class="btn btn-primary" autocomplete="false">提交</button>
    </form>
  </div>
</div>

{%endblock%}

{%block script%}
<script src="{%static '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js'%}"></script>
<script src="{%static '/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js'%}"></script>
<script>
    $(function(){
        $("#id_due_date").datepicker({
            format:'yyyy-mm-dd',
            startDate:'0',
            language:"zh-CN",
            autoclose:true
        });
        
    })
</script>
{%endblock%}